package com.xcf.service.impl;

import com.xcf.pojo.User;
import com.xcf.service.IUserService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class UserServiceImpl implements IUserService {

    @Value("${provider.server.port}")
    private Integer port;

    public String sayHello(String word) {
        System.out.println("调用成功--参数 "+word);
        return "调用成功--参数 "+word;
    }

    @Override
    public User register(User user) {
        User user1 = new User();
        user1.setId(port);
        user1.setName(user.getName());
        user1.setCreateTime(new Date());
        return user1;
    }
}
